home *** CD-ROM | disk | FTP | other *** search
- ISTHERE
-
- Bob Flanders and Michael Holmes May 2, 1992
- Current version: 1.00 - May 2, 1992
-
- Purpose: A short C program to test if enough spaced is available on the
- requested drive.
-
- Format: ISTHERE n [d:]
-
- n is a number in the format n, nK or nM
- n is an exact value (example: 50000)
- nK is a value where n is multiplied by 1K (example: 24k)
- nM is a value where n is multiplied by 1 meg (example: 1M)
-
- d: is an optional drive letter followed by a colon.
-
- Remarks: ISTHERE allows you to check if enough space exists on the
- specified drive. If you do not specify a drive, the current
- drive is checked.
-
- You may replace the "n" on the command line with a value in
- one of three formats: an exact value, a value in K bytes or
- value in MegaBytes. For example, if you want to check that
- there are at least 50,000 bytes available on the current drive,
- you would issue the command:
-
- ISTHERE 50000
-
- If you wanted to check for 500K being available on drive E:,
- you would issue the command:
-
- ISTHERE 500K E:
-
- ISTHERE returns both a message and a DOS errorlevel. The
- message describes any error that occurred or the results of
- the test. The errorlevel will be one of three values:
-
- 0: The space is available
- 1: The space is not available
- 2: An error occurred - command line syntax, bad drive or
- drive not ready.
-
- ISTHERE will not hang for an I/O error. If you have such an
- error, it will return errorlevel 2 and an error message.
-
- The batch file SPACE.BAT gives an example of using ISTHERE
- withing a batch program.
-
- -- Bob Flanders 72451,2611.